#ifndef _MOE_SELECTION
#define _MOE_SELECTION

#include "engine/Properties.hh"
#include "engine/ArrayList.hh"
#include "engine/Solution.hh"
#include "engine/Population.hh"
/** The Selection operator, it's applied when an individual or a set of individuals it's needed*/
class Selection {

public:
    Selection(){
    }

    virtual ~Selection(){
    }

    virtual Solution *select(Population *population) = 0;

    virtual ArrayList<Solution> *select(Population *population, int n) {
        ArrayList<Solution> *selections = new ArrayList<Solution>(false);

        while (selections->length() < n) selections->add(select(population));

        return selections;
    }
};


#endif
